import { Controller } from "@/controller/Controller.js";
export class ItemController extends Controller{
    constructor(){
        super();
        this.item=null;
    }

    setItem(item,index){
        this.item=item;
        this.index=index;
    }

    emit(name,...args){
        if(name=='item-use'){
            this._handler['item-use']?.(this.item,index,...args);
        }else{
            super.emit(name,...args);
        }
    }
}